<?php
namespace app\serverfund\validate;
use \app\manage\validate\BaseValidate;
/**
 * @author:      李颖
 * @DateTime:    2017-06-29 16:29:30
 * @Description: 数字币拆分
 */
class CurrencySplitLog extends BaseValidate
{

    protected $rule = [
        'user_id' => ['integer', 'gt' => '0'],
        'user_ids' => ['length'=>'1,256'],
        'currency' => ['float', 'egt' => '0.0001'],
        'public_key' => ['length'=>'60'],
        'lock_key' => ['length'=>'6,20'],
        'get_key' => ['length'=>'6,20'],
        'create_ip' => ['ip'],
        'update_ip' => ['ip'],
        'app_id' => ['integer', 'gt' => '0'],
        'opposite_id' => ['integer', 'gt' => '0', 'different' => 'user_id'],
        'status' => ['in'=>'0,1,2'],
        'user_info' => ['regex'=>'^{.*}$'],
        'opposite_info' => ['regex'=>'^{.*}$'],
    ];
    protected $message = [];
    protected $scene = [
        'split' =>['user_id', 'currency', 'lock_key', 'get_key', 'update_ip', 'app_id', 'user_info', 'opposite_info'],
        'lock' =>['user_id', 'public_key', 'lock_key', 'update_ip', 'app_id', 'user_info', 'opposite_info'],
        'read' =>['user_id', 'public_key', 'get_key', 'update_ip', 'app_id', 'user_info', 'opposite_info'],
        'readLock' =>['user_id', 'public_key', 'get_key', 'update_ip', 'app_id', 'user_info', 'opposite_info'],
        'list' => ['page', 'list_rows'],
        'listByUserIds' => ['page', 'list_rows', 'user_ids'],
        'listByUserStatus' => ['page', 'list_rows', 'user_ids', 'status'],
    ];
}
